/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gla.centralhotel.business;

import gla.centralhotel.exception.AgencySubscriptionException;
import gla.centralhotel.exception.IllegalAuthenticationException;
import gla.centralhotel.exception.ManagerSubscriptionException;
import gla.centralhotel.exception.SubscriptionManagementException;
import gla.centralhotel.model.*;
import javax.ejb.Local;

/**
 *
 * @author Rivo
 */
@Local
public interface ISubscriptionManagement {
    
    /**
     * Le manager ne contient pas directement les refZipcode et refCountry
     * @param manager
     * @param zipcode
     * @param country
     * @return
     */
    public Manager saveManagerSubscription(Manager manager, Zipcode zipcode, Country country) throws SubscriptionManagementException, IllegalAuthenticationException;

    /**
     * Ajoute ou met à jour un "manager" d'hotel
     * @param manager
     * @return
     */
    public Manager saveManagerSubscription(Manager manager) throws SubscriptionManagementException, IllegalAuthenticationException;
    
    /**
     * Màj d'un manager d'hotel
     * @param manager
     * @return
     * @throws gla.centralhotel.exception.ManagerSubscriptionException
     * @throws gla.centralhotel.exception.IllegalAuthenticationException
     */
    public Manager updateManagerInfo(Manager manager) throws ManagerSubscriptionException, IllegalAuthenticationException;
    
    public Agency saveAgencySubscription(Agency agency) throws AgencySubscriptionException, IllegalAuthenticationException;

}
